package fem2d;

import fem2.AbstractStructuralStaticDemo;
import fem2.MaterialModel;
import fem2.Model;
import fem2.enu.State;
import fem2.material.ExponentialSofteningRule;
import fem2.material.FluencyCriteria;
import fem2.material.IsotropicDamageMMimplex;

public class NotchBeamIsotropicDamageImplex extends NotchBeamIsotropicDamage {

	public NotchBeamIsotropicDamageImplex() {
		projectDir = "/home/hbui/kratos_janosch";
		projectName = "notchbeam.gid";
		meshFileName = "mesh1-damage-implex.msh";
	}

	// @Override
	// public MaterialModel createMaterial(Model m) {
	// return new IsotropicDamageMMimplex((IsotropicDamageMM)
	// super.createMaterial(m));
	// }

	@Override
	public MaterialModel createMaterial(Model m) {
		double E = 2;
		double nu = 0.3;
		double t = 1.0;
		double ft = 0.91;
		// double Gf = 0.065;

		double e0 = ft / Math.sqrt(E);
		// double ef = Gf / ft;
		// double ef = 3 * e0;
		double ef = 100 * e0;
		FluencyCriteria softeningRule = new ExponentialSofteningRule(e0, ef);
		return new IsotropicDamageMMimplex(E, nu, 0, t, State.PLANE_STRAIN, softeningRule, e0);

	}

	public static void main(String[] args) {
		AbstractStructuralStaticDemo demo = new NotchBeamIsotropicDamageImplex();
		//
		// demo.run(60);
		// demo.run(200);
		demo.run(500);
		// demo.run(1000);
	}
}
